package base.thread;

public class BankAccount {
	int balance;

	public BankAccount(int balance) {
		this.balance = balance;
		System.out.println("total money:"+balance);
	}

	public void depositor(int amount){
//		synchronized(this){
		balance=balance-amount;
//		}
	}
	public void withDrawer(int amount){
//		synchronized(this){
		balance=balance+amount;
//		}
	}

	public int getBalance() {
		return balance;
	}
}
